home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / COMPILER / SATHER / !Sather / Library / pSather / config / timing < prev   
Text File  |  1996-02-13  |  490b  |  21 lines

  1. #ifndef TIMING_CONFIG
  2. #define TIMING_CONFIG
  3.  
  4. #ifdef PP
  5. #undef PP
  6. #endif
  7.  
  8. #define PP    no_pre,no_post
  9.  
  10. -- most of the functions and macros used in this file are defined
  11. -- in am.h, the rest in pSather.h
  12. TIMING_TIME:    PP,
  13.         declare "int gettimeofday(struct timeval *,void *);"
  14.                 "extern int start_sec;",
  15.         var "struct timeval $$now;",
  16.          exec "gettimeofday(&$$now,NULL);"
  17.              "*$1=$$now.tv_sec-start_sec;"
  18.              "*$2=$$now.tv_usec;";
  19. TIMING_SLEEP:    volatile,exec "sleep($1);";
  20. #endif
  21.